import request from '@/utils/request'

// 获取部门树
export const getDeptTree = () => {
    return request({
        url: '/system/block/dept/getDeptTree',
        method: 'get'
    })
}
// 查询部门列表
export function getDeptList(query) {
    return request({
        url: '/system/block/dept/list',
        method: 'get',
        params: query
    })
}
// 新增部门信息
export function addDept(data) {
    return request({
        url: '/system/block/dept/addDept',
        method: 'post',
        data: data
    })
}
// 编辑部门信息
export function editDept(data) {
    return request({
        url: '/system/block/dept/editDept',
        method: 'put',
        data: data
    })
}
// 编辑部门状态
export function editDeptStatus(data) {
    return request({
        url: '/system/block/dept/editDeptStatus',
        method: 'put',
        data: data
    })
}

// 删除部门信息
export function deleteDept(deptId) {
    return request({
        url: '/system/block/dept/deleteDept/' + deptId,
        method: 'delete'
    })
}
